package com.book.Dao;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import com.jdbc.tool.DBLianjie;

public class SelectImg {
    public String findImg(String name){
    	System.out.print(name);
    	String s="";
    	Connection connection=null;
    	Statement stm=null;
    	ResultSet rSet=null;
    	String sql="select * from book where bookname='"+name+"'";
    	
    	connection=DBLianjie.getconn();
    	try {
			stm=connection.createStatement();
			rSet=stm.executeQuery(sql);
			rSet.next();
			s=rSet.getString("bookimg2");
		} catch (SQLException e) {
			e.printStackTrace();
		}
    	
    	return s;
    }
}
